<?php
	$CI=&get_instance();
	$CI->load->model('model_cp', 'model');
?>
<div class="wrapper left-box-wrapper">
    <div class="left-box-title"><h2>Danh mục</h2></div>
    <div class="left-box-content">
        <!--categories-->
        <ul class="ul-bullet-blue treeview" id="ul-left-cat">
        	<?php
				$i=0;
            	foreach($danhmucsanpham as $danhmuc):
				$i++;
					$danhmuccon = $CI->model->get_danhmucsanpham($danhmuc->id);
			?>
	            <li><a href="#" onclick="return false;"><?=$danhmuc->tieude?></a>
                	<ul class="left_sub_menu" <?php if($i==1) echo 'rel="open"'?> >
                    	<?php
							foreach($danhmuccon as $danhmuccon):
						?>
							<li><a href="<?=site_url('thangthanh/listproduct/'.$danhmuccon->id)?>"><?=$danhmuccon->tieude?></a></li>
						<?php
							endforeach;
                        ?>
                    </ul>
            <?php
            	endforeach;
			?>
        </ul>
                             <script type="text/javascript">

//ddtreemenu.createTree(treeid, enablepersist, opt_persist_in_days (default is 1))
ddtreemenu.createTree("ul-left-cat",false)

</script>
    <!--/categories-->
    
    </div>
    <div class="left-box-shadow"></div>
</div>